﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WorkFlowCore.UserSelectors
{
    /// <summary>
    /// 选择资源（简单理解为用户大分类）
    /// </summary>
    public class Selection
    {
        /// <summary>
        /// 分类 id
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 分类名称
        /// </summary>
        public string Name { get; set; }

        public override int GetHashCode()
        {
            return $"{Id}_{Name}".GetHashCode();
        }

        public override string ToString()
        {
            return $"{Id}_{Name}";
        }
        public override bool Equals(object obj)
        {
            return this.ToString().Equals(obj.ToString());
        }
    }
}
